= bootstrap_form_for [user, message], :layout => :horizontal do |f|

  -if message.reply_to
    =f.hidden_field :to
    =f.hidden_field :parent_id
  -else
    = f.text_field :to, :required => true, :autocomplete => "off", :id => "message_to", :label => :to.l, :placeholder => :type_a_username.l

    -content_for :end_javascript do
      = tag_auto_complete_field 'message_to', {:url => { :controller => "messages", :action => 'auto_complete_for_username'}, :tokens => [','], :tagLimit => 1 }

  -if @reply  
    = f.hidden_field :subject  
  -else
    = f.text_field :subject

  = f.text_area :body, :label => :message.l, :rows => 10, :class => "col-sm-6"

  = f.primary :send.l
